package maiyatian.videolive.login;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

import maiyatian.videolive.IActivity;
import maiyatian.videolive.MainActivity;
import maiyatian.videolive.R;

/**
 * Created by 王中阳 on 2016/5/10.
 */
@ContentView(R.layout.activity_login)
public class LoginActivity extends IActivity implements View.OnClickListener {
    public static final String TAG = "LoginActivity";
    @ViewInject(R.id.back)
    ImageView back;
    @ViewInject(R.id.btnLogin)
    Button btnLogin;


    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        back.setOnClickListener(this);
        btnLogin.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent();
        switch (v.getId()) {
            case R.id.back:
                this.finish();
                break;
            case R.id.btnLogin:
                intent.setClass(this, MainActivity.class);
                startActivity(intent);
                break;
        }
    }
}
